<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../../inc/taglib.jsp"%>
<div class="pageContent">
	<form method="post" action=" ${requestScope.record.rid ==null ?'system/organization/insertRole' :'system/organization/updateRole' }" class="pageForm required-validate"
		onsubmit="return validateCallback(this, dialogAjaxDone);">
		<div class="pageFormContent" layoutH="56">
			<!-- 关闭窗口 -->
			<input type="hidden" name="callbackType" value="closeCurrent" />
			<!-- 隐藏表单 -->
			<c:if test="${requestScope.record !=null}">
				<input type="hidden" name="gid" value="${requestScope.record.id}" />
			</c:if>
			
				<label>组织名：</label> <p>${requestScope.record.name }</p><br>
				
				 <c:if test="${requestScope.rrole ==null}">
				<label>请选择要授予的角色：</label><br>
			</c:if>
			
			 <c:if test="${requestScope.rrole!=null}">
			
			 	<label>现有角色：</label>
			 	<p><em>${requestScope.rrole.name }</em></p>
				
				</c:if> 
			<select name="rid">
			<c:if test="${roles!=null}">
			<c:forEach items="${roles }" var="role">
			 <%-- ${role.id==requestScope.resord.rid?'selected':'' --%>
			<option value="${role.id } "  ${requestScope.record.rid==role.id?'selected':'' }>${role.name }</option>
			</c:forEach>
			</c:if>
			</select>
			
		</div>
		<div class="formBar">
			<ul>
				<!--<li><a class="buttonActive" href="javascript:;"><span>保存</span></a></li>-->
				<li><div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">保存</button>
						</div>
					</div></li>
				<li>
					<div class="button">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div>
				</li>
			</ul>
		</div>
	</form>
</div>
